Rules for integrands of the form  u (((a+b ArcTan[c+d x]))^p)

1.  ∫u (((a+b ArcTan[c+d x]))^p)dx

1:  ∫(((a+b ArcTan[c+d x]))^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Integration by substitution

Rule: If  p∈(SuperPlus[ℤ]), then

∫(((a+b ArcTan[c+d x]))^p)dx  ⟶  (1/d) Subst[∫(((a+b ArcTan[x]))^p)dx,x,c+d x]

Program code:

Int[(a_.+b_.*ArcTan[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[(a+b*ArcTan[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d},x] && IGtQ[p,0]

Int[(a_.+b_.*ArcCot[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[(a+b*ArcCot[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d},x] && IGtQ[p,0]

U:  ∫(((a+b ArcTan[c+d x]))^p)dx  when  p∉(SuperPlus[ℤ])

Rule: If  p∉(SuperPlus[ℤ]), then

∫(((a+b ArcTan[c+d x]))^p)dx  ⟶  ∫(((a+b ArcTan[c+d x]))^p)dx

Program code:

Int[(a_.+b_.*ArcTan[c_+d_.*x_])^p_,x_Symbol] :=
  Unintegrable[(a+b*ArcTan[c+d*x])^p,x] /;
FreeQ[{a,b,c,d,p},x] && Not[IGtQ[p,0]]

Int[(a_.+b_.*ArcCot[c_+d_.*x_])^p_,x_Symbol] :=
  Unintegrable[(a+b*ArcCot[c+d*x])^p,x] /;
FreeQ[{a,b,c,d,p},x] && Not[IGtQ[p,0]]

2.  ∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx

1:  ∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx  when  d e-c f==0 ∧ p∈(SuperPlus[ℤ])

Derivation: Integration by substitution

Rule: If  d e-c f==0 ∧ p∈(SuperPlus[ℤ]), then

∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx  ⟶  (1/d) Subst[∫(((((f x)/d)))^m) (((a+b ArcTan[x]))^p)dx,x,c+d x]

Program code:

Int[(e_.+f_.*x_)^m_.*(a_.+b_.*ArcTan[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[(f*x/d)^m*(a+b*ArcTan[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d,e,f,m},x] && EqQ[d*e-c*f,0] && IGtQ[p,0]

Int[(e_.+f_.*x_)^m_.*(a_.+b_.*ArcCot[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[(f*x/d)^m*(a+b*ArcCot[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d,e,f,m},x] && EqQ[d*e-c*f,0] && IGtQ[p,0]

2:  ∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx  when  p∈(SuperPlus[ℤ])∧ m+1∈(SuperMinus[ℤ])

Derivation: Integration by parts

Basis: (∂_x)(((a+b ArcTan[c+d x]))^p)==((b d p (((a+b ArcTan[c+d x]))^(p-1)))/(1+(((c+d x))^2)))

Rule: If  p∈(SuperPlus[ℤ])∧ m+1∈(SuperMinus[ℤ]), then

∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx  ⟶  (((((e+f x))^(m+1)) (((a+b ArcTan[c+d x]))^p))/(f (m+1)))-((b d p)/(f (m+1))) ∫(((((e+f x))^(m+1)) (((a+b ArcTan[c+d x]))^(p-1)))/(1+(((c+d x))^2)))dx

Program code:

Int[(e_.+f_.*x_)^m_*(a_.+b_.*ArcTan[c_+d_.*x_])^p_.,x_Symbol] :=
  (e+f*x)^(m+1)*(a+b*ArcTan[c+d*x])^p/(f*(m+1)) - 
  b*d*p/(f*(m+1))*Int[(e+f*x)^(m+1)*(a+b*ArcTan[c+d*x])^(p-1)/(1+(c+d*x)^2),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[p,0] && ILtQ[m,-1]

Int[(e_.+f_.*x_)^m_*(a_.+b_.*ArcCot[c_+d_.*x_])^p_.,x_Symbol] :=
  (e+f*x)^(m+1)*(a+b*ArcCot[c+d*x])^p/(f*(m+1)) + 
  b*d*p/(f*(m+1))*Int[(e+f*x)^(m+1)*(a+b*ArcCot[c+d*x])^(p-1)/(1+(c+d*x)^2),x] /;
FreeQ[{a,b,c,d,e,f},x] && IGtQ[p,0] && ILtQ[m,-1]

3:  ∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Integration by substitution

Rule: If  p∈(SuperPlus[ℤ]), then

∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx  ⟶  (1/d)Subst[∫(((((d e-c f)/d)+((f x)/d)))^m)(((a+b ArcTan[x]))^p)dx,x,c+d x]

Program code:

Int[(e_.+f_.*x_)^m_.*(a_.+b_.*ArcTan[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[((d*e-c*f)/d+f*x/d)^m*(a+b*ArcTan[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d,e,f,m,p},x] && IGtQ[p,0]

Int[(e_.+f_.*x_)^m_.*(a_.+b_.*ArcCot[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[((d*e-c*f)/d+f*x/d)^m*(a+b*ArcCot[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d,e,f,m,p},x] && IGtQ[p,0]

U:  ∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx  when  p∉(SuperPlus[ℤ])

Rule: If  p∉(SuperPlus[ℤ]), then

∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx  ⟶  ∫(((e+f x))^m) (((a+b ArcTan[c+d x]))^p)dx

Program code:

Int[(e_.+f_.*x_)^m_.*(a_.+b_.*ArcTan[c_+d_.*x_])^p_,x_Symbol] :=
  Unintegrable[(e+f*x)^m*(a+b*ArcTan[c+d*x])^p,x] /;
FreeQ[{a,b,c,d,e,f,m,p},x] && Not[IGtQ[p,0]]

Int[(e_.+f_.*x_)^m_.*(a_.+b_.*ArcCot[c_+d_.*x_])^p_,x_Symbol] :=
  Unintegrable[(e+f*x)^m*(a+b*ArcCot[c+d*x])^p,x] /;
FreeQ[{a,b,c,d,e,f,m,p},x] && Not[IGtQ[p,0]]

3.  ∫(((e+f (x^n)))^m) (((a+b ArcTan[c+d x]))^p)dx

1.  ∫((ArcTan[a+b x])/(c+d (x^n)))dx

1:  ∫((ArcTan[a+b x])/(c+d (x^n)))dx  when  n∈ℚ

Derivation: Algebraic expansion

Basis: ArcTan[z]==(1/2) i Log[1-i z]-(1/2) i Log[1+i z]

Basis: ArcCot[z]==(i/2) Log[1-(i/z)]-(i/2) Log[1+(i/z)]

Rule: If  n∈ℚ, then

∫((ArcTan[a+b x])/(c+d (x^n)))dx  ⟶  (i/2)∫((Log[1-i a-i b x])/(c+d (x^n)))dx-(i/2)∫((Log[1+i a+i b x])/(c+d (x^n)))dx

Program code:

Int[ArcTan[a_+b_.*x_]/(c_+d_.*x_^n_.),x_Symbol] :=
  I/2*Int[Log[1-I*a-I*b*x]/(c+d*x^n),x] -
  I/2*Int[Log[1+I*a+I*b*x]/(c+d*x^n),x] /;
FreeQ[{a,b,c,d},x] && RationalQ[n]

Int[ArcCot[a_+b_.*x_]/(c_+d_.*x_^n_.),x_Symbol] :=
  I/2*Int[Log[(-I+a+b*x)/(a+b*x)]/(c+d*x^n),x] -
  I/2*Int[Log[(I+a+b*x)/(a+b*x)]/(c+d*x^n),x] /;
FreeQ[{a,b,c,d},x] && RationalQ[n]

2:  ∫((ArcTan[a+b x])/(c+d (x^n)))dx  when  n∉ℚ

Rule: If  n∉ℚ, then

∫((ArcTan[a+b x])/(c+d (x^n)))dx  ⟶  ∫((ArcTan[a+b x])/(c+d (x^n)))dx

Program code:

Int[ArcTan[a_+b_.*x_]/(c_+d_.*x_^n_),x_Symbol] :=
  Unintegrable[ArcTan[a+b*x]/(c+d*x^n),x] /;
FreeQ[{a,b,c,d,n},x] && Not[RationalQ[n]]

Int[ArcCot[a_+b_.*x_]/(c_+d_.*x_^n_),x_Symbol] :=
  Unintegrable[ArcCot[a+b*x]/(c+d*x^n),x] /;
FreeQ[{a,b,c,d,n},x] && Not[RationalQ[n]]

4:  ∫(((A+B x+C (x^2)))^q) (((a+b ArcTan[c+d x]))^p)dx  when  B (1+(c^2))-2 A c d==0 ∧ 2 c C-B d==0

Derivation: Integration by substitution

Basis: If  B (1+(c^2))-2 A c d==0 ∧ 2 c C-B d==0, then A+B x+C (x^2)==(C/(d^2))+(C/(d^2))(((c+d x))^2)

Rule: If  B (1+(c^2))-2 A c d==0 ∧ 2 c C-B d==0, then

∫(((A+B x+C (x^2)))^q) (((a+b ArcTan[c+d x]))^p)dx  ⟶  (1/d)Subst[∫((((C/(d^2))+((C (x^2))/(d^2))))^q)(((a+b ArcTan[x]))^p)dx,x,c+d x]

Program code:

Int[(A_.+B_.*x_+C_.*x_^2)^q_.*(a_.+b_.*ArcTan[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[(C/d^2+C/d^2*x^2)^q*(a+b*ArcTan[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d,A,B,C,p,q},x] && EqQ[B*(1+c^2)-2*A*c*d,0] && EqQ[2*c*C-B*d,0]

Int[(A_.+B_.*x_+C_.*x_^2)^q_.*(a_.+b_.*ArcCot[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[(C/d^2+C/d^2*x^2)^q*(a+b*ArcCot[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d,A,B,C,p,q},x] && EqQ[B*(1+c^2)-2*A*c*d,0] && EqQ[2*c*C-B*d,0]

5:  ∫(((e+f x))^m) (((A+B x+C (x^2)))^q) (((a+b ArcTan[c+d x]))^p)dx  when  B (1+(c^2))-2 A c d==0 ∧ 2 c C-B d==0

Derivation: Integration by substitution

Basis: If  B (1+(c^2))-2 A c d==0 ∧ 2 c C-B d==0, then A+B x+C (x^2)==(C/(d^2))+(C/(d^2))(((c+d x))^2)

Rule: If  B (1+(c^2))-2 A c d==0 ∧ 2 c C-B d==0, then

∫(((e+f x))^m) (((A+B x+C (x^2)))^q) (((a+b ArcTan[c+d x]))^p)dx  ⟶  (1/d)Subst[∫(((((d e-c f)/d)+((f x)/d)))^m)((((C/(d^2))+((C (x^2))/(d^2))))^q)(((a+b ArcTan[x]))^p)dx,x,c+d x]

Program code:

Int[(e_.+f_.*x_)^m_.*(A_.+B_.*x_+C_.*x_^2)^q_.*(a_.+b_.*ArcTan[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[((d*e-c*f)/d+f*x/d)^m*(C/d^2+C/d^2*x^2)^q*(a+b*ArcTan[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d,e,f,A,B,C,m,p,q},x] && EqQ[B*(1+c^2)-2*A*c*d,0] && EqQ[2*c*C-B*d,0]

Int[(e_.+f_.*x_)^m_.*(A_.+B_.*x_+C_.*x_^2)^q_.*(a_.+b_.*ArcCot[c_+d_.*x_])^p_.,x_Symbol] :=
  1/d*Subst[Int[((d*e-c*f)/d+f*x/d)^m*(C/d^2+C/d^2*x^2)^q*(a+b*ArcCot[x])^p,x],x,c+d*x] /;
FreeQ[{a,b,c,d,e,f,A,B,C,m,p,q},x] && EqQ[B*(1+c^2)-2*A*c*d,0] && EqQ[2*c*C-B*d,0]